#!/usr/local/python3/bin/python3.8
# -*- encoding: utf-8 -*-
'''
@File    :   hashlib.py    
@Contact :   tt_candy@outlook.com
@License :   仅供非生产环境使用
@Desciption: None
@Creation time：20/12/24 8:59

@Modify Time      @Author    @Version    @Modify action
------------      -------    --------    -----------
   None           ttcandy      1.0         None  
'''
import hashlib

user="alex"
pwd="admin"

s=hashlib.md5()     #初始化一个加密模板
s.update(pwd.encode("UTF-8"))       #添加要加密的字节
m=s.hexdigest()     #加密处理
print(m)
with open("userinfo.txt","a",encoding="UTF-8") as f:
    f.write(m+"\n")
